﻿<!--#INCLUDE FILE="config.asp"-->
<%
if(Session("SalesAccessLevel") <> 1 and Session("SalesAccessLevel") <> 4 ) then
	Response.Redirect("default.asp?msg=invalid")
end if

'Endcrypt information of CC
Set objEncrypter = Server.CreateObject ("Hyeongryeol.StringEncrypter")
objEncrypter.Key = edCode
objEncrypter.InitialVector = conIV

encryptNombreCard = objEncrypter.Encrypt(Request("NombreCard"))
encryptTipo = objEncrypter.Encrypt(Request("Tipo"))
encryptNumerodeTarjetaCard = objEncrypter.Encrypt(Request("NumerodeTarjetaCard"))
encryptCodigodeSeguridad = objEncrypter.Encrypt(Request("CodigodeSeguridad"))

' Add record to Trip Details
	Creator = Request("Creator")
	Product = Request("Product")
	Campaign = Request("Campaign")
	
	IF Campaign = "" then 
		Campaign = " "
	end if
	
	IF Product = "" then 
		Product = 1
	end if
	
	IF Creator = "" then 
		Creator = " "
	end if
	
	Extra_Guests = Request("Extra_Guests")
	Extra_Nights = Request("Extra_Nights")
	Kids = Request("Kids")
	Extra_Names = Request("Extra_Names")
	Room_Details = Request("Room_Details")
	Activities = Request("Activities")
	arrival1 = Request("arrival1")
	departure1 = Request("departure1")
	arrival2 = Request("arrival2")
	departure2 = Request("departure2")
	
	' Extra 1
	Creator_Extra1 = Request("Creator_divB")
	Product_Extra1 = Request("Product_divB")
	Campaign_Extra1 = Request("Campaign_divB")
	
	IF Campaign_Extra1 = "" then 
		Campaign_Extra1 = " "
	end if
	
	IF Product_Extra1 = "" then 
		Product_Extra1 = 1
	end if
	
	IF Creator_Extra1 = "" then 
		Creator_Extra1 = " "
	end if
	
	Extra_Guests_Extra1 = Request("Extra_Guests_divB")
	Extra_Nights_Extra1 = Request("Extra_Nights_divB")
	Kids_Extra1 = Request("Kids_divB")
	Extra_Names_Extra1 = Request("Extra_Names_divB")
	Room_Details_Extra1 = Request("Room_Details_divB")
	Activities_Extra1 = Request("Activities_divB")
	arrival1_Extra1 = Request("arrival1_divB")
	departure1_Extra1 = Request("departure1_divB")
	arrival2_Extra1 = Request("arrival2_divB")
	departure2_Extra1 = Request("departure2_divB")
	
' Extra 2
	Creator_Extra2 = Request("Creator_divC")
	Product_Extra2 = Request("Product_divC")
	Campaign_Extra2 = Request("Campaign_divC")
	
	IF Campaign_Extra2 = "" then 
		Campaign_Extra2 = " "
	end if
	
	IF Product_Extra2 = "" then 
		Product_Extra2 = 1
	end if
	
	IF Creator_Extra2 = "" then 
		Creator_Extra2 = " "
	end if
	
	Extra_Guests_Extra2 = Request("Extra_Guests_divC")
	Extra_Nights_Extra2 = Request("Extra_Nights_divC")
	Kids_Extra2 = Request("Kids_divC")
	Extra_Names_Extra2 = Request("Extra_Names_divC")
	Room_Details_Extra2 = Request("Room_Details_divC")
	Activities_Extra2 = Request("Activities_divC")
	arrival1_Extra2 = Request("arrival1_divC")
	departure1_Extra2 = Request("departure1_divC")
	arrival2_Extra2 = Request("arrival2_divC")
	departure2_Extra2 = Request("departure2_divC")
	
' Extra 3
	Creator_Extra3 = Request("Creator_divD")
	Product_Extra3 = Request("Product_divD")
	Campaign_Extra3 = Request("Campaign_divD")
	
	IF Campaign_Extra3 = "" then 
		Campaign_Extra3 = " "
	end if
	
	IF Product_Extra3 = "" then 
		Product_Extra3 = 1
	end if
	
	IF Creator_Extra3 = "" then 
		Creator_Extra3 = " "
	end if
	
	Extra_Guests_Extra3 = Request("Extra_Guests_divD")
	Extra_Nights_Extra3 = Request("Extra_Nights_divD")
	Kids_Extra3 = Request("Kids_divD")
	Extra_Names_Extra3 = Request("Extra_Names_divD")
	Room_Details_Extra3 = Request("Room_Details_divD")
	Activities_Extra3 = Request("Activities_divD")
	arrival1_Extra3 = Request("arrival1_divD")
	departure1_Extra3 = Request("departure1_divD")
	arrival2_Extra3 = Request("arrival2_divD")
	departure2_Extra3 = Request("departure2_divD")
	
' Add record to Transport
	Aereopuerto = Request("Aereopuerto")
	Aereolinea = Request("Aereolinea")
	Need_Transport = Request("Need_Transport")
	Aprox_Arrival_Time = Request("Aprox_Arrival_Time")
	Notes = Request("Notes")
	Pending_info = Request("Pending_info")

' Them record vao Guests
	Title = Request("Title") 
	Fname = Request("Fname")
	Mname = Request("Mname")
	Lname = Request("Lname")
	phone = Request("phone")
	email = Request("email")
	language = Request("language")
	Address1 = Request("Address1")
	Address2 = Request("Address2")
	City = Request("City")
	Stado = Request("Stado")
	Zip = Request("Zip")
	Pais = Request("Pais")
	Communication = Request("Communication")
	Source = Request("Source")
	
' Add record to Visit calendar
	Propiedad = Request("Property")
	if (Propiedad = "") then
		Propiedad = ""
	end if
	
	if (Propiedad = "VM" or Propiedad = "LC" or Propiedad = "Las Colinas" ) then
		Internest = "Full"
	elseif (Propiedad = "Residence Club") then
		Internest = "Fractional"
	else
		Internest = " "
	end if
	
	Give_Aways = Request("GiveAways")
	if (Give_Aways = "") then
		Give_Aways = ""
	end if
	Fecha = Request("Date_VisitCalendar")
	if (Fecha = "") then
		Fecha = ""
	end if
	hourday = Request("hour")
	minutesday = Request("minutes")
	timeday = Request("timeday")
	Hora_Time = hourday &"-"& minutesday & "-" &timeday 
	if (hourday = "" or minutesday = "") then
		Hora_Time = ""
	end if

' End Visit Calendar
	
	set objConnect = server.createObject("ADODB.Connection")       
		objConnect.open conStr
		
	Set oCmd = Server.CreateObject("ADODB.Command")
		  
		    oCmd.ActiveConnection = objConnect
			oCmd.CommandText = "sp_add_new_Prospect" 
			oCmd.CommandType = 4
			
			' ****************
			' Guests Parameters
			' ****************
			Set p_Title = oCmd.CreateParameter("@title", 200,1,100,Title)
			oCmd.Parameters.Append p_Title
			
			Set p_Fname = oCmd.CreateParameter("@Fname", 200,1,100,Fname)
			oCmd.Parameters.Append p_Fname
			
			Set p_Mname = oCmd.CreateParameter("@middle", 200,1,100,Mname)
			oCmd.Parameters.Append p_Mname
			
			Set p_Lname = oCmd.CreateParameter("@surname", 200,1,100,Lname)
			oCmd.Parameters.Append p_Lname
			
			Set p_Telefono = oCmd.CreateParameter("@phone", 200,1,100,phone)
			oCmd.Parameters.Append p_Telefono
			
			Set p_email = oCmd.CreateParameter("@email", 200,1,100,email)
			oCmd.Parameters.Append p_email
			
			Set p_language = oCmd.CreateParameter("@languageID", 3,1,100,language)
			oCmd.Parameters.Append p_language
			
			Set p_Address1 = oCmd.CreateParameter("@address1", 200,1,100,Address1)
			oCmd.Parameters.Append p_Address1
			
			Set p_Address2 = oCmd.CreateParameter("@address2", 200,1,100,Address2)
			oCmd.Parameters.Append p_Address2
			
			Set p_City = oCmd.CreateParameter("@city", 200,1,100,City)
			oCmd.Parameters.Append p_City
			
			Set p_Stado = oCmd.CreateParameter("@province", 200,1,100,Stado)
			oCmd.Parameters.Append p_Stado
			
			Set p_Zip = oCmd.CreateParameter("@zip", 200,1,100,Zip)
			oCmd.Parameters.Append p_Zip
			
			Set p_Pais = oCmd.CreateParameter("@country", 200,1,100,Pais)
			oCmd.Parameters.Append p_Pais
			
			Set p_Communication = oCmd.CreateParameter("@communication", 200,1,100,Communication)
			oCmd.Parameters.Append p_Communication
			
			Set p_Source = oCmd.CreateParameter("@Source", 200,1,100,Source)
			oCmd.Parameters.Append p_Source
			
			' *******************
			' Transport Parameter
			' *******************
			
			Set p_Aereopuerto = oCmd.CreateParameter("@Aereopuerto", 3,1,100,Aereopuerto)
			oCmd.Parameters.Append p_Aereopuerto
			
			Set p_Aereolinea = oCmd.CreateParameter("@Aereolinea", 3,1,100,Aereolinea)
			oCmd.Parameters.Append p_Aereolinea
			
			Set p_Need_Transport = oCmd.CreateParameter("@Need_Transport", 3,1,100,Need_Transport)
			oCmd.Parameters.Append p_Need_Transport
			
			Set p_Aprox_Arrival_Time = oCmd.CreateParameter("@Aprox_Arrival_Time", 200,1,100,Aprox_Arrival_Time)
			oCmd.Parameters.Append p_Aprox_Arrival_Time
			
			Set p_Notes = oCmd.CreateParameter("@Notes", 200,1,100,Notes)
			oCmd.Parameters.Append p_Notes
			
			Set p_Pending_info = oCmd.CreateParameter("@Pending_info", 200,1,100,Pending_info)
			oCmd.Parameters.Append p_Pending_info
			
			
			' *******************
			' Visit Calendar
			' *******************
			
			Set p_Propiedad = oCmd.CreateParameter("@Propiedad", 200,1,100,Propiedad)
			oCmd.Parameters.Append p_Propiedad
			
			Set p_Internest = oCmd.CreateParameter("@Internest", 200,1,100,Internest)
			oCmd.Parameters.Append p_Internest
			
			Set p_Give_Aways = oCmd.CreateParameter("@Give_Aways", 200,1,100,Give_Aways)
			oCmd.Parameters.Append p_Give_Aways
			
			Set p_Date = oCmd.CreateParameter("@Fecha", 200,1,100,Fecha)
			oCmd.Parameters.Append p_Date
			
			Set p_Time = oCmd.CreateParameter("@Hora_Time", 200,1,100,Hora_Time)
			oCmd.Parameters.Append p_Time

			
			' ********************
			' Trips Detail
			' **********************
			
			pCode = "PSP"&Year(DATE())
			
			Set p_Code = oCmd.CreateParameter("@code", 200,1,100,pCode)
			oCmd.Parameters.Append p_Code
			
			Set p_Creator = oCmd.CreateParameter("@Creator", 200,1,100,Creator)
			oCmd.Parameters.Append p_Creator
			
			Set p_Product = oCmd.CreateParameter("@Product", 200,1,100,Product)
			oCmd.Parameters.Append p_Product
			
			Set p_Campaign = oCmd.CreateParameter("@Campaign", 200,1,100,Campaign)
			oCmd.Parameters.Append p_Campaign
			
			Set p_Extra_Guests = oCmd.CreateParameter("@Extra_Guests", 3,1,100,Extra_Guests)
			oCmd.Parameters.Append p_Extra_Guests
			
			Set p_Extra_Nights = oCmd.CreateParameter("@Extra_Nights", 3,1,100,Extra_Nights)
			oCmd.Parameters.Append p_Extra_Nights
			
			Set p_Kids = oCmd.CreateParameter("@Kids", 3,1,100,Kids)
			oCmd.Parameters.Append p_Kids
			
			Set p_Extra_Names = oCmd.CreateParameter("@Extra_Names", 200,1,100,Extra_Names)
			oCmd.Parameters.Append p_Extra_Names
			
			Set p_Room_Details = oCmd.CreateParameter("@Room_Details", 200,1,100,Room_Details)
			oCmd.Parameters.Append p_Room_Details
			
			Set p_Activities = oCmd.CreateParameter("@Activities", 200,1,100,Activities)
			oCmd.Parameters.Append p_Activities
			
			Set p_arrival1 = oCmd.CreateParameter("@arrival1", 200,1,100,arrival1)
			oCmd.Parameters.Append p_arrival1
			
			Set p_departure1 = oCmd.CreateParameter("@departure1", 200,1,100,departure1)
			oCmd.Parameters.Append p_departure1
			
			Set p_arrival2 = oCmd.CreateParameter("@arrival2", 200,1,100,arrival2)
			oCmd.Parameters.Append p_arrival2
			
			Set p_departure2 = oCmd.CreateParameter("@departure2", 200,1,100,departure2)
			oCmd.Parameters.Append p_departure2
			
			
			'-------------------------------------------------------------------------------
			
			Set p_Code_Extra1 = oCmd.CreateParameter("@code_Extra1", 200,1,100,pCode)
			oCmd.Parameters.Append p_Code_Extra1
			
			Set p_Creator_Extra1 = oCmd.CreateParameter("@Creator_Extra1", 200,1,100,Creator_Extra1)
			oCmd.Parameters.Append p_Creator_Extra1
			
			Set p_Product_Extra1 = oCmd.CreateParameter("@Product_Extra1", 200,1,100,Product_Extra1)
			oCmd.Parameters.Append p_Product_Extra1
			
			Set p_Campaign_Extra1 = oCmd.CreateParameter("@Campaign_Extra1", 200,1,100,Campaign_Extra1)
			oCmd.Parameters.Append p_Campaign_Extra1
			
			Set p_Extra_Guests_Extra1 = oCmd.CreateParameter("@Extra_Guests_Extra1", 3,1,100,Extra_Guests_Extra1)
			oCmd.Parameters.Append p_Extra_Guests_Extra1
			
			Set p_Extra_Nights_Extra1 = oCmd.CreateParameter("@Extra_Nights_Extra1", 3,1,100,Extra_Nights_Extra1)
			oCmd.Parameters.Append p_Extra_Nights_Extra1
			
			Set p_Kids_Extra1 = oCmd.CreateParameter("@Kids_Extra1", 3,1,100,Kids_Extra1)
			oCmd.Parameters.Append p_Kids_Extra1
			
			Set p_Extra_Names_Extra1 = oCmd.CreateParameter("@Extra_Names_Extra1", 200,1,100,Extra_Names_Extra1)
			oCmd.Parameters.Append p_Extra_Names_Extra1
			
			Set p_Room_Details_Extra1 = oCmd.CreateParameter("@Room_Details_Extra1", 200,1,100,Room_Details_Extra1)
			oCmd.Parameters.Append p_Room_Details_Extra1
			
			Set p_Activities_Extra1 = oCmd.CreateParameter("@Activities_Extra1", 200,1,100,Activities_Extra1)
			oCmd.Parameters.Append p_Activities_Extra1
			
			Set p_arrival1_Extra1 = oCmd.CreateParameter("@arrival1_Extra1", 200,1,100,arrival1_Extra1)
			oCmd.Parameters.Append p_arrival1_Extra1
			
			Set p_departure1_Extra1 = oCmd.CreateParameter("@departure1_Extra1", 200,1,100,departure1_Extra1)
			oCmd.Parameters.Append p_departure1_Extra1
			
			Set p_arrival2_Extra1 = oCmd.CreateParameter("@arrival2_Extra1", 200,1,100,arrival2_Extra1)
			oCmd.Parameters.Append p_arrival2_Extra1
			
			Set p_departure2_Extra1 = oCmd.CreateParameter("@departure2_Extra1", 200,1,100,departure2_Extra1)
			oCmd.Parameters.Append p_departure2_Extra1
			
			' ********************
			' Trips Detail Extra2
			' **********************
			Set p_Code_Extra2 = oCmd.CreateParameter("@code_Extra2", 200,1,100,pCode)
			oCmd.Parameters.Append p_Code_Extra2
			
			Set p_Creator_Extra2 = oCmd.CreateParameter("@Creator_Extra2", 200,1,100,Creator_Extra2)
			oCmd.Parameters.Append p_Creator_Extra2
			
			Set p_Product_Extra2 = oCmd.CreateParameter("@Product_Extra2", 200,1,100,Product_Extra2)
			oCmd.Parameters.Append p_Product_Extra2
			
			Set p_Campaign_Extra2 = oCmd.CreateParameter("@Campaign_Extra2", 200,1,100,Campaign_Extra2)
			oCmd.Parameters.Append p_Campaign_Extra2
			
			Set p_Extra_Guests_Extra2 = oCmd.CreateParameter("@Extra_Guests_Extra2", 3,1,100,Extra_Guests_Extra2)
			oCmd.Parameters.Append p_Extra_Guests_Extra2
			
			Set p_Extra_Nights_Extra2 = oCmd.CreateParameter("@Extra_Nights_Extra2", 3,1,100,Extra_Nights_Extra2)
			oCmd.Parameters.Append p_Extra_Nights_Extra2
			
			Set p_Kids_Extra2 = oCmd.CreateParameter("@Kids_Extra2", 3,1,100,Kids_Extra2)
			oCmd.Parameters.Append p_Kids_Extra2
			
			Set p_Extra_Names_Extra2 = oCmd.CreateParameter("@Extra_Names_Extra2", 200,1,100,Extra_Names_Extra2)
			oCmd.Parameters.Append p_Extra_Names_Extra2
			
			Set p_Room_Details_Extra2 = oCmd.CreateParameter("@Room_Details_Extra2", 200,1,100,Room_Details_Extra2)
			oCmd.Parameters.Append p_Room_Details_Extra2
			
			Set p_Activities_Extra2 = oCmd.CreateParameter("@Activities_Extra2", 200,1,100,Activities_Extra2)
			oCmd.Parameters.Append p_Activities_Extra2
			
			Set p_arrival1_Extra2 = oCmd.CreateParameter("@arrival1_Extra2", 200,1,100,arrival1_Extra2)
			oCmd.Parameters.Append p_arrival1_Extra2
			
			Set p_departure1_Extra2 = oCmd.CreateParameter("@departure1_Extra2", 200,1,100,departure1_Extra2)
			oCmd.Parameters.Append p_departure1_Extra2
			
			Set p_arrival2_Extra2 = oCmd.CreateParameter("@arrival2_Extra2", 200,1,100,arrival2_Extra2)
			oCmd.Parameters.Append p_arrival2_Extra2
			
			Set p_departure2_Extra2 = oCmd.CreateParameter("@departure2_Extra2", 200,1,100,departure2_Extra2)
			oCmd.Parameters.Append p_departure2_Extra2
			
			' ********************
			' Trips Detail Extra 3
			' **********************
			
			Set p_Code_Extra3 = oCmd.CreateParameter("@code_Extra3", 200,1,100,pCode)
			oCmd.Parameters.Append p_Code_Extra3
			
			Set p_Creator_Extra3 = oCmd.CreateParameter("@Creator_Extra3", 200,1,100,Creator_Extra3)
			oCmd.Parameters.Append p_Creator_Extra3
			
			Set p_Product_Extra3 = oCmd.CreateParameter("@Product_Extra3", 200,1,100,Product_Extra3)
			oCmd.Parameters.Append p_Product_Extra3
			
			Set p_Campaign_Extra3 = oCmd.CreateParameter("@Campaign_Extra3", 200,1,100,Campaign_Extra3)
			oCmd.Parameters.Append p_Campaign_Extra3
			
			Set p_Extra_Guests_Extra3 = oCmd.CreateParameter("@Extra_Guests_Extra3", 3,1,100,Extra_Guests_Extra3)
			oCmd.Parameters.Append p_Extra_Guests_Extra3
			
			Set p_Extra_Nights_Extra3 = oCmd.CreateParameter("@Extra_Nights_Extra3", 3,1,100,Extra_Nights_Extra3)
			oCmd.Parameters.Append p_Extra_Nights_Extra3
			
			Set p_Kids_Extra3 = oCmd.CreateParameter("@Kids_Extra3", 3,1,100,Kids_Extra3)
			oCmd.Parameters.Append p_Kids_Extra3
			
			Set p_Extra_Names_Extra3 = oCmd.CreateParameter("@Extra_Names_Extra3", 200,1,100,Extra_Names_Extra3)
			oCmd.Parameters.Append p_Extra_Names_Extra3
			
			Set p_Room_Details_Extra3 = oCmd.CreateParameter("@Room_Details_Extra3", 200,1,100,Room_Details_Extra3)
			oCmd.Parameters.Append p_Room_Details_Extra3
			
			Set p_Activities_Extra3 = oCmd.CreateParameter("@Activities_Extra3", 200,1,100,Activities_Extra3)
			oCmd.Parameters.Append p_Activities_Extra3
			
			Set p_arrival1_Extra3 = oCmd.CreateParameter("@arrival1_Extra3", 200,1,100,arrival1_Extra3)
			oCmd.Parameters.Append p_arrival1_Extra3
			
			Set p_departure1_Extra3 = oCmd.CreateParameter("@departure1_Extra3", 200,1,100,departure1_Extra3)
			oCmd.Parameters.Append p_departure1_Extra3
			
			Set p_arrival2_Extra3 = oCmd.CreateParameter("@arrival2_Extra3", 200,1,100,arrival2_Extra3)
			oCmd.Parameters.Append p_arrival2_Extra3
			
			Set p_departure2_Extra3 = oCmd.CreateParameter("@departure2_Extra3", 200,1,100,departure2_Extra3)
			oCmd.Parameters.Append p_departure2_Extra3

			' ********************
			' CreditCards
			' **********************
			Set NombreCard = oCmd.CreateParameter("@NombreCard", 200,1,100,encryptNombreCard)
			oCmd.Parameters.Append NombreCard
			
			Set Tipo = oCmd.CreateParameter("@Tipo", 200,1,100,encryptTipo)
			oCmd.Parameters.Append Tipo
			
			Set NumerodeTarjetaCard = oCmd.CreateParameter("@NumerodeTarjetaCard", 200,1,100,encryptNumerodeTarjetaCard)
			oCmd.Parameters.Append NumerodeTarjetaCard
			
			Set Address1_billing = oCmd.CreateParameter("@Address1_billing", 200,1,100,Request("Direccion1_billing"))
			oCmd.Parameters.Append Address1_billing
			
			Set Address2_billing = oCmd.CreateParameter("@Address2_billing", 200,1,100,Request("Direccion2_billing"))
			oCmd.Parameters.Append Address2_billing
			
			Set City_billing = oCmd.CreateParameter("@City_billing", 200,1,100,Request("Ciudad_billing"))
			oCmd.Parameters.Append City_billing
			
			Set Country_billing = oCmd.CreateParameter("@Country_billing", 200,1,100,Request("Pais_billing"))
			oCmd.Parameters.Append Country_billing
			
			Set ZipCode_billing = oCmd.CreateParameter("@ZipCode_billing", 200,1,100,Request("Postal_billing"))
			oCmd.Parameters.Append ZipCode_billing
			
			Set Province_billing = oCmd.CreateParameter("@Province_billing", 200,1,100,Request("Stado_billing"))
			oCmd.Parameters.Append Province_billing
			
			Set FechaDeExpiracion = oCmd.CreateParameter("@FechaDeExpiracion", 200,1,100,Request("FechaDeExpiracion"))
			oCmd.Parameters.Append FechaDeExpiracion
			
			Set CodigodeSeguridad = oCmd.CreateParameter("@CodigodeSeguridad", 200,1,100,encryptCodigodeSeguridad)
			oCmd.Parameters.Append CodigodeSeguridad
			
			Set userId = oCmd.CreateParameter("@userId", 3,1,100,session("SalesId"))
			oCmd.Parameters.Append userId
			
			' ********************
			' End CreditCards
			' **********************
			
			if (Request("Marital") <> "" ) then
				p_marital = Request("Marital")
			else 
				p_marital = ""
			end if
			
			if (Request("boat") <> "" ) then
				p_boat = Request("boat")
			else 
				p_boat = ""
			end if
			
			if (Request("feet") <> "" ) then
				p_feet = Request("feet")
			else 
				p_feet = ""
			end if
			
			if (Request("golf") <> "" ) then
				p_golf = Request("golf")
			else 
				p_golf = ""
			end if
			
			if (Request("investment_Range") <> "" ) then
				p_investment_Range = Request("investment_Range")
			else 
				p_investment_Range = ""
			end if
			
			if (Request("Occupation") <> "" ) then
				p_Occupation = Request("Occupation")
			else 
				p_Occupation = ""
			end if
			
			if (Request("kindOfInvestment") <> "" ) then
				p_kindOfInvestment = Request("kindOfInvestment")
			else 
				p_kindOfInvestment = ""
			end if
			
			if (Request("Annual_Income") <> "" ) then
				p_Annual_Income = Request("Annual_Income")
			else 
				p_Annual_Income = ""
			end if
			
			' *************************************'
			Set Marital = oCmd.CreateParameter("@MaritalStatus", 200,1,100,p_marital)
			oCmd.Parameters.Append Marital
			
			Set OwnABoat = oCmd.CreateParameter("@OwnABoat", 200,1,100,p_boat)
			oCmd.Parameters.Append OwnABoat
			
			Set Feet = oCmd.CreateParameter("@Feet", 200,1,100,p_feet)
			oCmd.Parameters.Append Feet
			
			Set PlayGolf = oCmd.CreateParameter("@PlayGolf", 200,1,100,p_golf)
			oCmd.Parameters.Append PlayGolf
			
			Set InvestmentRange = oCmd.CreateParameter("@InvestmentRange", 200,1,100,p_investment_Range)
			oCmd.Parameters.Append InvestmentRange
			
			Set Occupation = oCmd.CreateParameter("@Occupation", 200,1,100,p_Occupation)
			oCmd.Parameters.Append Occupation
			
			Set KindOfInvestment = oCmd.CreateParameter("@KindOfInvestment", 200,1,100,p_kindOfInvestment)
			oCmd.Parameters.Append KindOfInvestment
			
			Set AnnualIncome = oCmd.CreateParameter("@AnnualIncome", 200,1,100,p_Annual_Income)
			oCmd.Parameters.Append AnnualIncome
			
		set rss = oCmd.execute
	
	Response.Redirect("sales-dashboard.asp")

%>